package com.kkb.kkbportal.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @ClassName ProjectRegister
 * @Description TODO 项目报名
 * @Author hxf
 * @Date 2021/8/12
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("project_register")
@ApiModel(value = "项目报名对象", description = "")
public class ProjectRegister implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("项目报名表主键id")
    @NotEmpty
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("项目id")
    @TableField("project_id")
    private Long projectId;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("角色(0 导师，1 学生)")
    @Range(max = 0, min = 1, message = "必须大于等于0或小于等于2")
    private Integer role;

    @ApiModelProperty("报名状态(0 未报名，1 报名中，2 已报名)")
    @Range(max = 0, min = 2, message = "必须大于等于0或小于等于2")
    @TableField("register_status")
    private Integer registerStatus;

    @ApiModelProperty("创建人")
    private String creator;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private String createTime;

    @ApiModelProperty("修改人")
    private String updater;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private String updateTime;

    @ApiModelProperty("是否已删除")
    //在字段上加上这个注解再执行BaseMapper的删除方法时，删除方法会变成修改
    @TableLogic
    @TableField("is_deleted")
    private String deleted;
}
